package com.atguigu.guli.service.sms.controller;

import com.atguigu.guli.service.base.result.R;
import com.atguigu.guli.service.sms.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController

@RequestMapping("/api/sms")
public class SmsController {
    @Autowired
    SmsService smsService;

    @GetMapping("send")
    //type :1 注册短信  2登陆短信  3订单支付成功短信......
    public R sendMsg(@RequestParam("mobile") String mobile,
                     @RequestParam("type") Integer type){
        smsService.sendMsg(mobile,type);
        return R.ok();
    }
}
